Touch screen driver installation for UBUNTU-8.10 and X11 
(C) 2008 Chart Wu

==============================================================================
QUICKSTART GUIDE
==============================================================================
1. setup xorg driver
   a. decompress xfhiddrv_drv.tar.gz
      #gzip -d xfhiddrv_drv.tar.gz
      #tar xvf xfhiddrv_drv.tar 
   b. Copy xfhiddrv_drv.so to /usr/lib/xorg/modules/input/xfhiddrv_drv.so 

      #cp   xfhiddrv_drv.o /usr/lib/xorg/modules/input/xfhiddrv_drv.so

   c. Add the a new "InputDevice" Section as the following.

Section "InputDevice"
	Identifier	"HID TOUCH"
	Driver		"xfhiddrv"
	Option		"Device"	"/dev/ttyS0"
	Option		"ScreenNo"	"0"
	Option		"SwapY"	"0"
	Option		"SendCoreEvents"	"true"
EndSection

    In the item of "Device", you must depend on your computer. So, it can be the value, 
such as the followings.
        "/dev/usb/hiddevx"  x=0,1,..2, n   ---> USB HID Device
        "/dev/ttySx"  x=0,1,..2, n   ---> RS232 Device


   d. Add "ServerLayout" section as the following lines into xorg.conf(maybe in /etc or /etc/X11)file.

Section "ServerLayout"
	Identifier	"Default Layout"
	screen	"Default Screen"
	InputDevice	"HID TOUCH"
EndSection

** PS: If your xorg.conf is empty, you have to add all the content of xorg.conf.
       The following is the example.
**************************** xorg.conf example ***********************************************************
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Device"
	Identifier	"Configured Video Device"
EndSection

Section "InputDevice"
	Identifier	"HID TOUCH"
	Driver		"xfhiddrv"
	Option		"Device"	"/dev/usb/hiddev0"
	Option		"ScreenNo"	"0"
	Option		"SwapY"	"0"
	Option		"SendCoreEvents"	"true"
EndSection

Section "Monitor"
	Identifier	"Configured Monitor"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
	Device		"Configured Video Device"
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	screen	"Default Screen"
	InputDevice	"HID TOUCH"
EndSection
************************************ end *****************************************************************       
   e. Press Ctrl+Alt+Backspace to restart X server. 

2. Setup and run Linear Utility:
   I. Linearity Utility:
   a. installation 
      step 1. decompress LinearAp.tar.gz 
         #gzip -d LinearAp.tar.gz
         #tar xvf LinearAp.tar.gz 
      step 2. copy linearity utility to /usr/local/bin
         #cp ./LinearAp /usr/local/bin
   b. Run linearity utility
      I. HID device
      #sudo LinearAp  /dev/usb/hiddevx n
      II. RS232 device
      #sudo LinearAp  /dev/ttySx n
      where x=0,1,2...n, n = 4 or 9 <default>  
      
      
